<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$is_language?'關連賬號':'Connected account'}</title>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/weui.min.css">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/jquery-weui.css">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/demos.css">
    <script src="__MODULE_LIBS__/js/jquery-2.1.4.js"></script>
    <script src="__MODULE_LIBS__/js/fastclick.js"></script>
    <script src="__MODULE_LIBS__/js/jquery-weui.js"></script>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        html {
            width: 100%;
            height: 100%;
            font-size: 20px;
            font-family: "Microsoft YaHei", "宋体", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo;
            background: #F3F3F3;
        }

        body {
            margin: 0 auto;
            max-width: 750px;
            height: 100%;
            background: #F7F7F7;
        }

        .navbar {
            position: relative;
            width: 100%;
            height: 2rem;
            font-size: 16px;
            color: #fff;
            line-height: 2rem;
            background: #373553;
        }

        .navbar-item {
            position: absolute;
            left: 0;
            top: 0;
            display: block;
            width: 3.2rem;
            height: 2rem;
            font-size: 14px;
            color: #fff;
            text-align: center;
        }

        .navbar-item > img {
            width: 0.8rem;
            height: 0.7rem;
            vertical-align: middle;
        }

        .navbar-center {
            text-align: center;
        }

        .content {
            width: 100%;
        }

        .rlForm {
            padding-top: 1px;
        }

        .weui-cells {
            font-size: 0.75rem;
        }

        .weui-cell__hd {
            width: 5.2rem;
        }

        .weui-label {
            width: 5.2rem;
        }

        .weui-select {
            padding-left: 0;
            height: 1.41176471em;
            line-height: 1.41176471;
            -webkit-appearance: menulist;
        }
    </style>
</head>
<body>
<header class="navbar">
    <a href="{:url('user/lists')}" class="navbar-item">
        <img src="__MODULE_LIBS__/img/back.png"/>&nbsp;{$is_language?'返回':'Return'}
    </a>
    <div class="navbar-center">{$is_language?'關連賬號':'Connected account'}</div>
    <div class="navbar-item1">
        <select name="" id="yy">
            <option value="1" {$is_language?'selected':''}>中文</option>
            <option value="0" {$is_language?'':'selected'}>English</option>
        </select>
    </div>
</header>
<div class="content">
    <form action="" method="post" class="rlForm">
        <div class="weui-cells weui-cells_form">
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label"> {$is_language?'賬號':'account'}</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input" type="text"
                           placeholder="{$is_language?'請輸入賬號':'Please enter your account number'}" name="username" {if
                           isset($user)}
                           value="{$user.username}" readonly="readonly" {/if}>
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">{$is_language?'昵稱':'nickname'}</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input" type="text"
                           placeholder="{$is_language?'請輸入昵稱':'Please enter your nickname'}" name="nickname" {if
                           isset($user)}
                           value="{$user.nickname}" {/if}>
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">{$is_language?'密碼':'password'}</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input" type="text"
                           placeholder="{$is_language?'請輸入您的密碼':'Please input your password'}" name="password1">
                </div>
            </div>
        </div>
        <div class="weui-cells weui-cells_form">
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">{$is_language?'提現類型':'Type of release'}</label>
                </div>
                <div class="weui-cell__bd">
                    <select class="weui-select" name="withdrawal_type">
                        <option value="0" {if isset($user)} {if $user.withdrawal_type="=0" } selected {
                        /if} {/if}>{$is_language?'支付寶':'Alipay'}</option>
                        <option value="1" {if isset($user)} {if $user.withdrawal_type="=1" } selected {
                        /if} {/if}>{$is_language?'銀行卡':'Bank card'}</option>
                    </select>
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">{$is_language?'開戶賬號':'Account number'}</label>
                </div>
                <div class="weui-cell__bd">
                    <input class="weui-input" type="text"
                           placeholder="{$is_language?'請輸入開戶賬號':'Please enter an account number'}" name="account" {if
                           isset($user['account'])}
                    value="{$user.account}" {/if}>
                </div>
            </div>
        </div>
        <div class="weui-cells weui-cells_form">
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">{$is_language?'開戶名':'Account name'}</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input" type="text"
                           placeholder="{$is_language?'請輸入完整姓名':'Please enter full name'}" name="account_name" {if
                           isset($user['account_name'])}
                    value="{$user.account_name}" {/if}>
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">{$is_language?'開戶銀行':'Bank of deposit'}</label>
                </div>
                <div class="weui-cell__bd">
                    <input class="weui-input" type="text"
                           placeholder="{$is_language?'銀行卡開戶請輸入開戶銀行':'Bank card, please enter an account bank'}"
                           name="bank" {if isset($user['bank'])}
                    value="{$user.bank}" {/if}>
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">{$is_language?'開戶地址':'Opening address'}<span
                        style="color: #888888;font-size: 12px;">({$is_language?'选填':'Optional'})</span></label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input" type="text"
                           placeholder="{$is_language?'銀行卡開戶請輸入開戶地址':'Bank card, please enter the account address'}"
                           name="acc_bank" {if isset($user['acc_bank'])}
                    value="{$user.acc_bank}" {/if}>
                </div>
            </div>
        </div>
        {if isset($user['id'])} <input type="hidden" name="id" value="{$user.id}"> {/if}
        <div class="weui-btn-area">
            <input class="weui-btn weui-btn_warn" type="submit" value="{$is_language?'確&nbsp;認':'Determine'}">
        </div>
    </form>
</div>


<script type="text/javascript">
    $(document).on("change",'select#yy',function(){
        var yy = $(this).val();
        console.log(yy)
        var url = "{:url('index/language')}";
        $.post(url,{language:yy},function (res) {
            window.location.reload();
        })
    });
    $(function () {
        FastClick.attach(document.body);
    })
</script>
</body>
</html>